package exam.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/3/20 19:29
 * @since JDK 1.8
 */
@ApiModel("调度任务模块")
@Data
@TableName("djob")
public class BJob {

    @ApiModelProperty("id")
    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty("任务名称")
    @TableField("jobName")
    private String jobName;

    @ApiModelProperty("调度类型,0 job;1 方法;2 rest")
    @TableField("jobType")
    private Integer jobType;

    @ApiModelProperty("调度组名")
    @TableField("groupName")
    private String groupName;

    @ApiModelProperty("http执行路径")
    @TableField("executePath")
    private String executePath;

    @ApiModelProperty("执行方法")
    @TableField("methodName")
    private String methodName;

    @ApiModelProperty("job类路径")
    @TableField("clazz")
    private String clazz;

    @ApiModelProperty("cron表达式")
    @TableField("cron")
    private String cron;

    @ApiModelProperty("方法参数")
    @TableField("args")
    private Object[] args;

    @ApiModelProperty("状态,0 执行;1 暂停; 3删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("运行状态,0正常; 1异常")
    @TableField("execuStatus")
    private Integer execuStatus;

    @ApiModelProperty("创建时间")
    @TableField("createDate")
    private Date createDate;

    @ApiModelProperty("下次执行时间")
    @TableField("nextDate")
    private Date nextDate;

    @ApiModelProperty("上次执行时间")
    @TableField("lastDate")
    private Date lastDate;

    @ApiModelProperty("首次执行时间")
    @TableField("firstDate")
    private Date firstDate;

    @ApiModelProperty("备注")
    @TableField("note")
    private String note;
}
